﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace System
{
    public class BaseException : Exception
    {
        public int Status { get; set; }

        public string Code { get; set; }

        private string message;

        public override string Message { get => message; }

        public BaseException()
        {
            this.Status = 500;
        }

        public BaseException(string message) : this()
        {
            this.message = message;
        }

        public BaseException(string code, string message) : this(message)
        {
            this.Code = code;
        }

        public BaseException(ExceptionType type, string message) : this(type.ToString(), message)
        {

        }

        public BaseException(int status, string code, string message):this(code, message)
        {
            this.Status = status;
        }
    }
}
